app.controller('HomeCtrl', ['$scope', '$http', 'DataService', function ($scope, $http, DataService) {
    $http.get('http://h5.yztctech.net/api/axf/apihomehot.php').then(function (res) {
        $scope.goods = res.data.data;
    });

    $scope.add = function () {
        console.log(this.g);

        DataService.addItem(this.g);
        console.log(DataService.getAllGoods());
    };
}])
